﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media.Media3D;
using System.Windows.Controls;

namespace FlyingCell
{
    class Grid : UserControl3DGroup
    {
        /// <summary>
        /// Constructor
        /// </summary>
        public Grid(string GridName)
        {
            // TODO: not to be here
            mPosition = new Point3D(0, 375, 0);

            mName = GridName;

            // TODO: change hard coded Line number
            for (int i = 0; i < 5; i++)
            {
                Line TmpLine = new Line(mName + "." + i.ToString());

                TmpLine.mPosition = new Point3D(mPosition.X, mPosition.Y - i * 125, mPosition.Z);

                Add(TmpLine);
            }
        }

        /// <summary>
        /// Show the Grid as selected
        /// </summary>
        public override void Select()
        {
            // TODO: Selection might depend on visible object and their order, not always on index 2!!!
            base.Select(2);
        }
    }
}
